<template>
  <div>
      <h3 :class="{red:boolean}" :style="{backgroundColor:color}">动态css</h3>
  </div>
</template>

<script>
export default {
    data(){
        return{
            boolean:true,
            color:'gray'
        }
    }

}
</script>

<style>
.red{
    color: red;
}
</style>